﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Threading.Tasks;

namespace CookieLogin.Entity
{
    public class User
    {
        public long Id { get; set; }


        [Required(ErrorMessage ="{0}不能为空!")]
        [Display(Name ="用户名")]
        public string UserName { get; set; }

        [Required(ErrorMessage ="{0}密码不能为空!")]
        [Display(Name ="密码")]
        [DataType(DataType.Password)]
        [MinLength(4,ErrorMessage ="{0}长度不能小于{1}")]
        public string Password { get; set; }

        //[Compare(nameof(Password))]
        public string ConfirmPassword { get; set; }

    }
}
